home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / program / 4cmp22s.zip / EXEGO.4TH < prev    next >
Text File  |  1994-10-30  |  1KB  |  27 lines

  1. \ HEADER FOR .EXE  PROGRAMS                      09:36 06/25/94
  2. \ COPYRIGHT 1985, 1991 (C) BY THOMAS ALMY.  ALL RIGHTS RESERVED
  3. \ Permission is granted to registered users of ForthCMP to
  4. \ sell or distrubute computer programs incorporating the compiled
  5. \ contents of this file.
  6.  
  7. \ MS-DOS is a trademark of Microsoft Corporation.
  8.  
  9. \ This file is for MS-DOS EXE files, with or without a separate stack segment.
  10.  
  11. 10  ASM HEX FWD,  ( skip the variables )
  12. HEX  DSEG
  13. VARIABLE DP       ( start free ram = HERE, set by END command )
  14. VARIABLE S0       ( top of stack )
  15. VARIABLE R0       ( top of return stack )
  16. VARIABLE BASE     ( radix )  0A BASE !  ( decimal )
  17. CSEG CREATE SEGOFFSET 0 ,  ( will be filled by END command )
  18. THEN,   
  19. SEPSSEG? [IF] AX CS <SEG  SEGOFFSET [] AX ADD [ELSE] AX SS <SEG  [THEN]
  20. AX DS >SEG
  21. SP AX MOV AX BP MOV AX DEC AX DEC AX S0 [] MOV
  22. rssize # BP ADD BP R0 [] MOV \ return stack
  23. 0 0 IN/OUT NEED MAIN
  24. CLD  CALL' MAIN   ( call main program )
  25. CODE bye  4C # AX MOV 21 INT END-CODE
  26. FORTH 0A = [IF]  DECIMAL  [THEN] DSEG
  27.